﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Docx2Epub.Docx
{
    public class DocChapter : DocHeading
    {
        
        public DocChapter(string title, int chaperNumber)
        {
            this.Title = title;
            this.ChaperNumber = chaperNumber;
        }

        public int ChaperNumber { set; get; }

        public string FileName { get { return ChapterId + ".xhtml"; } }

        public override string OrderNumber
        {
            get { return ChaperNumber.ToString(); }
        }

        public string ChapterId
        {
            get { return string.Format("chapter{0:000}", ChaperNumber); }
        }
        
        public override string ToString()
        {
            return "Capter " + ChaperNumber + ". : " + Title;
        }

        public override string HeadingHtmlLink
        {
            get { return FileName; }
        }
    }
}
